﻿<%@ Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Cursos.aspx.cs" Inherits="Cursos_Cursos" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td style="width: 72px">Curso Nombre:</td><td><asp:TextBox ID="txtNombre" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 72px">Turno:</td><td>
    <asp:DropDownList ID="ddlTurno" runat="server" DataSourceID="SqlDataSource1" DataTextField="Detalle" DataValueField="idTurno">
    </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ColegiosConnectionString %>"
        SelectCommand="SELECT [idTurno], [Detalle] FROM [TipoTurno]"></asp:SqlDataSource>
</td>
</tr>
    <tr>
        <td style="width: 72px">
        </td>
        <td>
            <asp:Button ID="cmdAccion" runat="server" OnClick="cmdAccion_Click" Text="Nuevo" />
            <asp:Button ID="cmdCancelar" runat="server" Text="Cancelar" /></td>
    </tr>
</table>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
        AutoGenerateColumns="False"
        EmptyDataText="No hay registros de datos para mostrar." 
        OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDeleting="GridView1_RowDeleting" OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging" 
        >
        <Columns>
            <asp:BoundField DataField="IdCurso" HeaderText="IdCurso" ReadOnly="True" SortExpression="IdCurso" />
            <asp:BoundField DataField="CursoDescrip" HeaderText="Nombre Curso" SortExpression="CursoDescrip" />
            <asp:BoundField DataField="Detalle" HeaderText="Turno" SortExpression="Turno" />
              <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <div id="noprint">
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Select"
                                        ImageUrl="~/Images/b_edit.gif" Text="Ver" />
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
            <asp:TemplateField>
            <ItemTemplate>
                <div id="noprint">
                    <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" CommandName="Delete"
                        ImageUrl="~/Images/delete.gif" Text="Delete" />
                </div>
            </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
    </asp:GridView>
</asp:Content>

